<?php

namespace app\api\controller;

use app\admin\model\course\Cate;
use ba\Date;
use Throwable;
use ba\Captcha;
use ba\Random;
use app\common\model\User;
use think\facade\Validate;
use app\common\facade\Token;
use app\common\model\UserScoreLog;
use app\common\model\UserMoneyLog;
use app\common\controller\Frontend;
use app\api\validate\Account as AccountValidate;

class CourseCate extends Frontend
{
    protected array $noNeedLogin = ['lists'];


    public function initialize(): void
    {
        parent::initialize();
    }

    public function lists(): void
    {
        $params = $this->request->param();
        $res = Cate::where(['status' =>1 ])->order('weigh asc')->paginate($params['limit'] ?? 10);

        $this->success('',['lists' => $res->items(),'total' => $res->total()]);
    }


}
